import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserModule } from './user/user.module';
import { UploadModule } from './upload/upload.module';
import { CustomTableModule } from './custom-table/custom-table.module';
import { CustomFormModule } from './custom-form/custom-form.module';
import { CustomFormSubmitModule } from './custom-form-submit/custom-form-submit.module';
import { CustomFlowModule } from './custom-flow/custom-flow.module';
import { CustomFlowNodeModule } from './custom-flow-node/custom-flow-node.module';
import { MatterModule } from './matter/matter.module';
import { DeptModule } from './dept/dept.module';
import { CustomFlowSubmitModule } from './custom-flow-submit/custom-flow-submit.module';
import { MatterSubmitModule } from './matter-submit/matter-submit.module';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: 'lrl1017.',
      database: 'base',
      entities: ["dist/**/*.entity{.ts,.js}"],
      synchronize: true,
    }),
    UserModule,
    UploadModule,
    CustomTableModule,
    CustomFormModule,
    CustomFormSubmitModule,
    CustomFlowModule,
    CustomFlowNodeModule,
    MatterModule,
    DeptModule,
    CustomFlowSubmitModule,
    MatterSubmitModule
  ],
})
export class AppModule {
}
